<script type="text/javascript" src="__PUBLIC__/js/getFromJson.js"></script>
<footer class="footer-container">
    <div class="index_brand clear">
        <div class="footer_left fl">
            <div class="clear">
                <?php $location = 'http://'.$_SERVER['HTTP_HOST']; ?>
                <yang:navlist typeid="0">
                    <?php if($navlist[navlist]=='Y'): ?>
                        <dl>
                            <dt>{$navlist[name]}</dt>
                            <volist name='navlist["child"]' id='v'>
                                <dd><a href="<?=$v[pid]==131?$location.'#'.$v[ename]:'pn_'.$v[ename]?>">{$v.name}</a></dd>
                            </volist>
                        </dl>
                    <?php endif; ?>
                </yang:navlist>
            </div>
            <div class="footer_contact_info">
                <div>
                    <span class="footer_contact_info_phone"></span>
                    <p>加盟热线：<yang:phone /></p>
                </div>
                <div>
                    <span class="footer_contact_info_address"></span>
                    <p>
                        地址：<yang:address />
                    </p>
                </div>
            </div>
            <yang:abc id="20" limit="1">
                <div class="footer_wx">
                    <div>
                            <img src="{$abc.content}" alt="" />
                    </div>
                    <p>扫一扫 联系我们</p>
                </div>
            </yang:abc>
        </div>
        <div class="footer_right fr">
            <div class="footer_form_info">
                <span></span>
                <p>有任何问题请联系我们<br>
                    我们将以最快的速度回复您
                </p>
            </div>
            <form id="addform">
                <input type="text" name="username" placeholder="*姓名" />
                <input type="text" name="tel" placeholder="*电话" />
                <textarea name="content" placeholder="说点什么" id="message"></textarea>
                <button type="button" id="add">提交留言</button>
            </form>
            <script type="application/javascript">
                $('#add').click(function(){
                    var json = getJsonFrom('addform');
                    $.getJSON("{:U('Message/saveMessage')}",json,function(data){
                        switch (data['code']){
                            case 1:
                                toastr['success'](data['msg']);

                                break;
                            case 2:
                                toastr['error'](data['msg']);
                                break;
                        }
                        var doc = document.getElementById('addform').getElementsByTagName('input');
                        for(var i=0;i<doc.length;i++){
                            if(doc[i].getAttribute('name')) {
                                doc[i].value = "";
                            }
                        }
                        doc = document.getElementById('addform').getElementsByTagName('textarea');
                        for(var i=0;i<doc.length;i++){
                            doc[i].value = "";
                        }
                    });

                });
            </script>
        </div>
    </div>
    <address class="index_brand footer_address">
        友情链接：
        <yang:flink typeid="0" limit="8" >
            <a href="{$flink[url]}">{$flink[name]}</a>&nbsp;
        </yang:flink><br/>
        版权信息：<yang:copyright />
    </address>
</footer>
<a href="javascript:scroll(0,0)" class="go_top"></a>